package com.woniuxy.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;

/**
 * @BelongsProject: java-85-course-code
 * @BelongsPackage: com.woniuxy.controller
 * @Author: LiTongMiao
 * @Date: 2022/1/24 15:00
 * @Description: TODO
 */
@Controller
/*@contriller注册到spring容器中，只是在spring中注册一个bean，名字叫做MysecondController，我们可以通过getbean获得*/
@RequestMapping("/managerController")
public class MysecondController {

    @RequestMapping(path = {"/findOne","/findTwo"},method = RequestMethod.GET)
    public ModelAndView findOne(){
        ModelAndView modelAndView=new ModelAndView();
        modelAndView.addObject("msg","欢迎来到对抗路");
        modelAndView.setViewName("myTest");
        return modelAndView;
    }
}
